﻿using Coldairarrow.Entity.MEGA;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.MEGA
{
    public interface IMEGA_LeafBladeBusiness
    {
        Task<PageResult<MEGA_LeafBladeDTO>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<MEGA_LeafBlade> GetTheDataAsync(string id);
        Task AddDataAsync(MEGA_LeafBlade data);
        Task UpdateDataAsync(MEGA_LeafBlade data);
        Task DeleteDataAsync(List<string> ids);
        Task UpdateStateDataAsync(List<StateDTO> input);
        Task SaveTheFactoryAsync(List<MEGA_LeafBladeAndFactory> input);
        Task SaveMaterialDataAsync(List<MEGA_LeafBladeAndMaterial> input);
        Task SaveThePeopleDataAsync(List<MEGA_LeafBladeAndWorker> input);
        Task<PageResult<MEGA_LeafBladeDTO>> GetOverDataListAsync(PageInput<ConditionDTO> input);
        Task BuildQrCodeDataAsync(List<string> ids);
        Task<object> GetQrCodeByIdDataAsync(IdInputDTO input);
        Task<string> DownLoadQrCodeDataAsync(IdInputDTO input);
        Task<string> GetTheQrCodeDataAsync(IdInputDTO input);
 
    }

    public class StateDTO
    {
        public string id { get; set; }
        public int state { get; set; }
    }

    public class MEGA_QrCodeDTO
    {

        public string Id { get; set; }
        /// <summary>
        /// 叶片基本信息
        /// </summary>
        public MEGA_LeafBlade Leafmodel { get; set; }

        /// <summary>
        /// 加工厂基本信息
        /// </summary>
        public MEGA_FactoryManagement Factorymodel { get; set; }

        /// <summary>
        /// 加工人基本信息
        /// </summary>
        public List<MEGA_Worker> WorkerList { get; set; }

        /// <summary>
        /// 油漆基本信息
        /// </summary>
        public List<MEGA_Material> MaterialList { get; set; }

        
    }


    public class MEGA_LeafBladeNum: MEGA_LeafBlade
    {
        public string Num { get; set; }
    }

    public class MEGA_LeafBladeDTO : MEGA_LeafBlade
    {
        /// <summary>
        /// 加工厂id集合
        /// </summary>
        public List<string> FactoryIds { get; set; }

        /// <summary>
        /// 加工厂名集合
        /// </summary>
        public List<string> FactoryNames { get; set; }

        /// <summary>
        /// 材料id集合
        /// </summary>
        public List<string> MaterialIds { get; set; }

        /// <summary>
        /// 材料名称集合
        /// </summary>
        public List<string> MaterialNames { get; set; }

        /// <summary>
        /// 加工人id集合
        /// </summary>
        public List<string> WorkerIds { get; set; }

        /// <summary>
        /// 加工人姓名集合
        /// </summary>
        public List<string> WorkerNames { get; set; }
    }

    public class SelectDTO
    {
        public string id { get; set; }

        public string name { get; set; }
    }
}